#!/bin/bash
echo "#############################################################"
echo "# kali-peizhi                                               #"
echo "# Author: gubei                                             #"
echo "#############################################################"
cp  /etc/apt/sources.list /etc/apt/sources.list.bak;
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib">/etc/apt/sources.list
curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
echo 'deb https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian/ buster stable' | sudo tee /etc/apt/sources.list.d/docker.list
apt-get clean;apt-get update;apt install vim -y
apt-get install docker-ce -y
apt-get install docker-compose -y 
apt-get install -y  zsh git  dos2unix  bash-completion  ;
apt-get install apt-transport-https ca-certificates curl gnupg software-properties-common dirmngr -y ;
apt-get install -y  python-pip python3-pip ctags xclip astyle python-setuptools python-dev  ;
apt-get install fcitx-googlepinyin open-vm-tools-desktop -y;

echo "if [ -f /etc/bash_completion ]; then" >>/etc/profile
echo ". /etc/bash_completion">>/etc/profile
echo "fi">>/etc/profile
source /etc/profile;
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple;
pip install autopep8
 ln -s /usr/bin/ctags /usr/local/bin/ctags
cd ~/ && git clone https://github.com/ma6174/vim.git
mv -f ~/vim ~/.vim
mv -f ~/.vim/.vimrc ~/
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
vim ma6174 -c "BundleInstall" -c "q" -c "q"
echo "安装完成"
git clone https://github.com/kevinw/pyflakes-vim.git
cd pyflakes-vim/ftplugin
cp -R ./python/  ~/.vim/ftplugin/
sed -i '28d' /root/.vim/ftplugin/python/pyflakes.vim 
cd /root/kali
dos2unix oh-my-zsh.sh;
chmod +x oh-my-zsh.sh;
./oh-my-zsh.sh